
export default {
  data() {
    return {
      ruleForm: {
        workOrderNo: null,
        systemName: null,
        eventStatus: null,
        eventLevel: null,
        eventSource: null,
        faultType: null,
        area: null,
        declarer: null,
        receiver: null,
        faultPhenomenon: null
      },
      dialogVisible: false
    }
  },
  computed: {
    searchOptions() {
      return [
        {
          value: 'valueSetCode',
          key: 'valueSetCode',
          label: '值集代码',
          type: 'input',
          placeholder: '请输入值集代码'
        },
        {
          value: 'valueDesc',
          key: 'valueDesc',
          label: '值集描述',
          type: 'input',
          placeholder: '请输入值集描述'
        }
      ]
    },
    childSearchOptions() {
      return [
        {
          value: 'val',
          key: 'val',
          label: '值代码',
          type: 'input',
          placeholder: '请输入值代码'
        },
        {
          value: 'valueDesc',
          key: 'valueDesc',
          label: '值集描述',
          type: 'input',
          placeholder: '请输入值集描述'
        },
        {
          value: 'remark',
          key: 'remark',
          label: '备注',
          type: 'input',
          placeholder: '请输入备注'
        }
      ]
    },
    tableColumn() {
      return [
        {
          type: 'selection',
          fixed: 'left',
          width: 55,
          align: 'center'
        },
        {
          prop: 'valueSetCode',
          label: '值集代码',
          align: 'center'
        },
        {
          prop: 'opDivision',
          label: '操作类型',
          align: 'center',
          render: (h, scope) => {
            // 0-新增、1－修改、2－删除
            return <div>{this.transType(scope.row.opDivision)}</div>
          }
        },
        {
          prop: 'valueDesc',
          align: 'center',
          label: '值集描述'
        },
        {
          prop: 'lastUpdatePerson',
          align: 'center',
          label: '最后修改人'
        },
        {
          prop: 'lastyUpdateTime',
          align: 'center',
          label: '最后修改时间'
        },
        {
          label: '操作',
          fixed: 'right',
          width: 200,
          render: (h, params) => {
            return h('div', [
              h('el-button', {
                props: { type: 'text', size: 'small', icon: 'el-icon-edit', loading: false },
                style: { marginRight: '5px' },
                on: {
                  click: () => {
                    this.handleEdit(params)
                  }
                }
              }, '编辑'),
              h('el-divider', {
                props: { direction: 'vertical' }
              }),
              h('el-button', {
                props: { type: 'text', size: 'small', icon: 'el-icon-delete', loading: false },
                on: {
                  click: () => {
                    this.handleDelete(params)
                  }
                }
              }, '删除')
            ])
          }
        }
      ]
    },
    tableBottomColumn() {
      return [
        {
          type: 'selection',
          width: 55,
          fixed: 'left',
          align: 'center'
        },
        {
          prop: 'val',
          label: '值代码',
          align: 'center'
        },
        {
          prop: 'valueSetCode',
          label: '值集代码',
          align: 'center'
        },
        {
          prop: 'opDivision',
          label: '操作类型',
          align: 'center',
          render: (h, scope) => {
            return <div>{this.transType(scope.row.opDivision)}</div>
          }
        },
        {
          prop: 'valueDesc',
          align: 'center',
          label: '值集描述'
        },
        {
          prop: 'validStartDate',
          align: 'center',
          label: '有效起始日期'
        },
        {
          prop: 'validEndDate',
          align: 'center',
          label: '有效终止日期'
        },
        {
          prop: 'lastUpdatePerson',
          align: 'center',
          label: '最后修改人'
        },
        {
          prop: 'lastlyUpdateTime',
          align: 'center',
          label: '最后修改时间'
        },
        {
          prop: 'remark',
          align: 'center',
          label: '备注'
        },
        {
          label: '操作',
          width: 200,
          fixed: 'right',
          render: (h, params) => {
            return h('div', [
              h('el-button', {
                props: { type: 'text', size: 'small', icon: 'el-icon-edit', loading: false },
                style: { marginRight: '5px' },
                on: {
                  click: () => {
                    this.bottomHandleEdit(params)
                  }
                }
              }, '编辑'),
              h('el-divider', {
                props: { direction: 'vertical' }}),
              h('el-button', {
                props: { type: 'text', size: 'small', icon: 'el-icon-delete', loading: false },
                on: {
                  click: () => {
                    this.bottomHandleDelete(params)
                  }
                }}, '删除')
            ])
          }
        }
      ]
    }
  },
  methods: {

  }
}
